<?php

namespace app\lijunxuan\controller;

use app\common\LijunxuanController;
use app\lijunxuan\model\Note as NoteDB;
class Note extends LijunxuanController
{
    public function initialize()
    {
        $this->model = new NoteDB();
    }

    public function list()
    {
        $list = $this->model
        ->order("note_sort desc")
        ->with('user')
        ->select()
        ->hidden(['create_by', 'update_by']);
        $res = [
            'rows' => $list,
            'total' => count($list)
        ];
        return success('获取成功', $res);
    }
}